#ifndef BACKEND_H
#define BACKEND_H

#include <QObject>
#include <QWidget>

#include "_Interface/_interface_backend.h"

class Backend : public BackendInterface {
    Q_OBJECT
public:
    Backend();
    ~Backend();
public:

public:
    void BackendInit();
    void BackendDeInit();
public:
    void FastTimerLoop();
    void SlowTimerLoop();

public:

    bool onbtnclicked_vPower();
    bool onbtnclicked_ESTOP_Clicked();

    bool onbtnclicked_Pause();
    bool onbtnclicked_Run();
    bool onbtnclicked_Stop();

    void onbtnclicked_fn1();
    void onbtnclicked_fn2();
    void onbtnclicked_fn3();
    void onbtnclicked_fn4();

    void onbtnpressed_XP();
    void onbtnpressed_YP();
    void onbtnpressed_ZP();
    void onbtnpressed_AP();
    void onbtnpressed_BP();
    void onbtnpressed_CP();

    void onbtnpressed_XN();
    void onbtnpressed_YN();
    void onbtnpressed_ZN();
    void onbtnpressed_AN();
    void onbtnpressed_BN();
    void onbtnpressed_CN();

    void onbtnpressed_E1P();
    void onbtnpressed_E2P();
    void onbtnpressed_E1N();
    void onbtnpressed_E2N();

    void onbtnreleased_XP();
    void onbtnreleased_YP();
    void onbtnreleased_ZP();
    void onbtnreleased_AP();
    void onbtnreleased_BP();
    void onbtnreleased_CP();

    void onbtnreleased_XN();
    void onbtnreleased_YN();
    void onbtnreleased_ZN();
    void onbtnreleased_AN();
    void onbtnreleased_BN();
    void onbtnreleased_CN();

    void onbtnreleased_E1P();
    void onbtnreleased_E2P();
    void onbtnreleased_E1N();
    void onbtnreleased_E2N();

    void onbtnclicked_MannualOverrideP(double& value);
    void onbtnclicked_ProgramOverrideP(double& value);

    void onbtnclicked_MannualOverrideN(double& value);
    void onbtnclicked_ProgramOverrideN(double& value);

    void fromBackendMessageCommand(QByteArray Data);
    void toBackendMessage(QByteArray& Data);
};

#endif // BACKEND_H
